<?php

namespace app\api\controller;

use app\common\controller\Api;
use think\Request;

class Product extends Api
{
    public function index()
    {
        if($this->request->isPost())
        {
            $post = input('post.');
            $limit = $post['limit'] ?? 10;
            $page = $post['page'] ?? 1;
            $class = $post['classs_id'] ?? 1;
            $list = model('product')->where('classs_id','=',$class)->paginate($limit);
            return fh(200,'success','成功',$list);
        }
    }
}
